{% extends 'student/layout.html' %}
{% block css_js %}
<script type="text/javascript" src="{{ url_for('static', filename='ueditor/ueditor.config.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='ueditor/ueditor.all.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='ueditor/lang/zh-cn/zh-cn.js') }}"></script>

{% endblock %}

{% block content %}
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs">
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-home home-icon"></i>
            <a>笔记管理</a>
        </li>
        <li>
            <a href="/student/student_notes_list/1">随堂测试</a>
        </li>
        <li>
            <a>编辑</a>
        </li>
    </ul><!-- /.breadcrumb -->
</div>
<div style="height: 35px;"></div>
<form role="form" style="margin-bottom:6px;" method="post" enctype="multipart/form-data">
    {% for msg in get_flashed_messages(category_filter=["ok"]) %}
        <div class="alert alert-success alert-dismissible">
            {{ msg }}
        </div>
    {% endfor %}
    <div class="form-group">
        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 笔记名称：</label>
        <div class="col-sm-9">
            <input style="margin-left: -130px;" type="text" id="form-field-1" name="name" value="{{ notes.name }}" placeholder="输入笔记名称" class="col-xs-10 col-sm-5" >
        </div>
    </div>
    <div class="form-group">
        <div>
            <label for="input_content">内容</label>
{#            <textarea id="input_content"  name="content"></textarea>#}
            <script id="input_content" name="content" type="text/plain">
                {{ notes.content | safe }}
            </script>
        </div>
    </div>
    {{ scrf_token }}
    <input style="background-color: #87b87f!important;border-color: #87b87f;height: 40px;color: #fff;width: 90px;" type="submit" value="提交内容">

</form>
{% endblock %}

{% block js %}
<script>
var ue = UE.getEditor('input_content',{
    toolbars: [
        ['fullscreen', 'emotion', 'preview', 'link','simpleupload','Source', 'Undo', 'Redo','Bold','test']
    ],
    initialFrameWidth:"100%",
    initialFrameHeight:"100",
});
</script>

{% endblock %}